package net.tv90.bfmccore.game;

import net.tv90.bfmccore.game.impl.cq.*;
import net.tv90.bfmccore.util.area.Area;
import net.tv90.bfmccore.util.vector.Vector3i;

import java.io.Serializable;
import java.util.List;

public enum EnumConquestAreaType implements Serializable {

    ConquestArea{
        @Override
        public ConquestArea getInstance(Area area, String index, String name, boolean canCapture, List<Vector3i> firstFactionSpawn, List<Vector3i> firstFactionSpawnWhenCapturing, List<Vector3i> secondFactionSpawn, List<Vector3i> secondFactionSpawnWhenCapturing) {
            return new ConquestArea(area, index, name, canCapture, firstFactionSpawn, firstFactionSpawnWhenCapturing, secondFactionSpawn, secondFactionSpawnWhenCapturing);
        }
    },

    GeneralSpawnConquestArea{
        @Override
        public ConquestArea getInstance(Area area, String index, String name, boolean canCapture, List<Vector3i> firstFactionSpawn, List<Vector3i> firstFactionSpawnWhenCapturing, List<Vector3i> secondFactionSpawn, List<Vector3i> secondFactionSpawnWhenCapturing) {
            return new GeneralSpawnConquestArea(area, index, name, canCapture, firstFactionSpawn, firstFactionSpawnWhenCapturing, secondFactionSpawn, secondFactionSpawnWhenCapturing);
        }
    },

    VehicleSpawnConquestArea{
        @Override
        public ConquestArea getInstance(Area area, String index, String name, boolean canCapture, List<Vector3i> firstFactionSpawn, List<Vector3i> firstFactionSpawnWhenCapturing, List<Vector3i> secondFactionSpawn, List<Vector3i> secondFactionSpawnWhenCapturing) {
            return new VehicleSpawnConquestArea(area, index, name, canCapture, firstFactionSpawn, firstFactionSpawnWhenCapturing, secondFactionSpawn, secondFactionSpawnWhenCapturing);
        }
    },

    FrontLineConquestArea {
        @Override
        public ConquestArea getInstance(Area area, String index, String name, boolean canCapture, List<Vector3i> firstFactionSpawn, List<Vector3i> firstFactionSpawnWhenCapturing, List<Vector3i> secondFactionSpawn, List<Vector3i> secondFactionSpawnWhenCapturing) {
            return new FrontLineConquestArea(area, index, name, canCapture, firstFactionSpawn, firstFactionSpawnWhenCapturing, secondFactionSpawn, secondFactionSpawnWhenCapturing);
        }
    },

    FrontLineGeneralSpawnConquestArea{
        @Override
        public ConquestArea getInstance(Area area, String index, String name, boolean canCapture, List<Vector3i> firstFactionSpawn, List<Vector3i> firstFactionSpawnWhenCapturing, List<Vector3i> secondFactionSpawn, List<Vector3i> secondFactionSpawnWhenCapturing) {
            return new FrontLineGeneralSpawnConquestArea(area, index, name, canCapture, firstFactionSpawn, firstFactionSpawnWhenCapturing, secondFactionSpawn, secondFactionSpawnWhenCapturing);
        }
    },

    FrontLineVehicleSpawnConquestArea{
        @Override
        public ConquestArea getInstance(Area area, String index, String name, boolean canCapture, List<Vector3i> firstFactionSpawn, List<Vector3i> firstFactionSpawnWhenCapturing, List<Vector3i> secondFactionSpawn, List<Vector3i> secondFactionSpawnWhenCapturing) {
            return new FrontLineVehicleSpawnConquestArea(area, index, name, canCapture, firstFactionSpawn, firstFactionSpawnWhenCapturing, secondFactionSpawn, secondFactionSpawnWhenCapturing);
        }
    };

    public ConquestArea getInstance(Area area, String index, String name, boolean canCapture, List<Vector3i> firstFactionSpawn, List<Vector3i> firstFactionSpawnWhenCapturing, List<Vector3i> secondFactionSpawn, List<Vector3i> secondFactionSpawnWhenCapturing){
        return null;
    }
}
